package models.msgs;

public class Bankrupt implements Comparable {
	private String name;
	private int cash;
	private int numberOfWin;
	public Bankrupt(String name,int cash,int numberOfWin) {
		this.name = name;
		this.cash = cash;
		this.numberOfWin=numberOfWin;
	}
	public String getName(){
		return name;
	}
	public int getCash() {
		return cash;
	}
	public int getNumberOfWin() {
		return numberOfWin;
	}
	@Override
	public int compareTo(Object o) {
		if(this.cash-((Bankrupt)o).cash != 0)
			return this.cash-((Bankrupt)o).cash;
		else
			return this.numberOfWin-((Bankrupt)o).numberOfWin;
	}
}
